<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户商品关系列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            归属用户：<input type="text" name="userId"/>
                        </li>

                        <li>
                            提交状态：<input type="text" name="payStatus"/>
                        </li>
                        <li>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-success btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('channel:userGoodsInfo:edit')}]];
    var removeFlag = [[${@permission.hasPermi('channel:userGoodsInfo:remove')}]];
    var prefix = ctx + "channel/userGoodsInfo";

    $(function () {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "用户商品关系",
            showExport: true,
            sortName: "createTime",
            sortOrder: "desc",
            columns: [{
                checkbox: true
            },
                {
                    field: 'orderId',
                    title: '订单编号',
                    visible: false
                },
                {
                    field: 'payStatus',
                    title: '订单状态',
                    formatter: function (value, row, index) {
                        return value === 'SUBMIT' ? '已完成' : '未完成';
                    }
                },
                {
                    field: 'productId',
                    title: '商品id',
                    sortable: true
                },
                {
                    field: 'productName',
                    title: '商品名称',
                    visible: false
                },
                {
                    field: 'userId',
                    title: '归属用户',
                    sortable: true
                },
                {
                    field: 'goodPrice',
                    title: '商品价格',
                    sortable: true
                },
                {
                    field: 'taskPrice',
                    title: '卡单金额',
                    sortable: true
                },
                {
                    field: 'profit',
                    title: '佣金',
                    sortable: true
                },
                {
                    field: 'createTime',
                    title: '创建时间',
                    sortable: true
                },
                {
                    field: 'imgUrl',
                    title: '图片地址',
                    formatter: function (value, row, index) {
                        return '<img src="'+value+'" />';
                    }
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>